package javachess;

public class game
{

}
/*
MOVEMENT STUFF

	bool Game::movePawn(int x, int y)
	{
		// PAWN MOVER MULTIPLIER (FOR DIFFERENT PLAYERS
		int pawnMovementMultiplier;
		if (selectedSquare->getOwner() == 1)
			pawnMovementMultiplier = 1; // THIS MOVES THE PAWN UP
		else
			pawnMovementMultiplier = -1; // THIS MOVES THE PAWN DOWN

		// ACTUAL MOVEMENT CHECKS
		if ((selectedSquareX == x) 
		&& (selectedSquareY == y + (1 * pawnMovementMultiplier))
		&& gameBoard[y][x].getOwner() == 0) // if the pawn wants to move 1 space vertically
			return true;
		if ((selectedSquareX == (x+1) || selectedSquareX == (x-1))
		&& (selectedSquareY == y + (1 * pawnMovementMultiplier))
		&& (gameBoard[y][x].getOwner() != 0)) // if the pawn wants to attack diagonally
			return true;
		if(!selectedSquare->getHasMoved())
		{
			if ((selectedSquareX == x) 
			&& (selectedSquareY == y + (2 * pawnMovementMultiplier))
			&& gameBoard[y][x].getOwner() == 0) // if the pawn wants to move 2 space vertically
				return true;
		}

		return false;
	}

	bool Game::moveRook(int x, int y)
	{
		if(selectedSquareX != x
		&& selectedSquareY != y)
			return false;
		if(selectedSquareY == y)								// destination has the same y
		{
			if(selectedSquareX < x)									// destination is to the right
			{
				for(int mid = selectedSquareX; mid < x; ++mid)			// make a variable that moves from left start to right finish
					if(mid != selectedSquareX)
						if(gameBoard[y][mid].getOwner() != 0)			// check each movement for owned squares
							return false;								// cancel the move if current square is owned.
			}
			else													// destination is to the left
			{
				for(int mid = selectedSquareX; mid > x; --mid)			// make a variable that moves from right start to left finish
					if(mid != selectedSquareX)
						if(gameBoard[y][mid].getOwner() != 0)			// check each movement for owned squares
							return false;								// cancel the move if current square is owned.
			}
		}
		else													// destination has the same x
		{
			if(selectedSquareY < y)									// destination is up
			{
				for(int mid = selectedSquareY; mid < y; ++mid)			// make a variable that moves from lower start to upper finish
					if(mid != selectedSquareY)
						if(gameBoard[mid][x].getOwner() != 0)			// check each movement for owned squares
							return false;								// cancel the move if current square is owned.
			}
			else													// destination is down
			{
				for(int mid = selectedSquareY; mid > y; --mid)			// make a variable that moves from upper start to lower finish
					if(mid != selectedSquareY)
						if(gameBoard[mid][x].getOwner() != 0)			// check each movement for owned squares
							return false;								// cancel the move if current square is owned.
			}
		}

		return true;												// ALL SYSTEMS GO!
	}

	bool Game::moveKnight(int x, int y)
	{
		if(	(selectedSquareX + 1 == x && selectedSquareY + 2 == y)
		||	(selectedSquareX + 1 == x && selectedSquareY - 2 == y)
		||	(selectedSquareX + 2 == x && selectedSquareY + 1 == y)
		||	(selectedSquareX + 2 == x && selectedSquareY - 1 == y)
		||	(selectedSquareX - 1 == x && selectedSquareY + 2 == y)
		||	(selectedSquareX - 1 == x && selectedSquareY - 2 == y)
		||	(selectedSquareX - 2 == x && selectedSquareY + 1 == y)
		||	(selectedSquareX - 2 == x && selectedSquareY - 1 == y)
		)
			return true; // ALL POSSIBLE MOVES FOR KNIGHT!
		else
			return false;
	}

	bool Game::moveBishop(int x, int y)
	{
		int SSX = selectedSquareX; // SS is the starting, plain x and y are the target
		int SSY = selectedSquareY;

		if(!(((SSX - SSY) == (x - y))
			||
			((SSX + SSY) == (x + y))))
			return false;
		
		if(SSY < y)								// destination is down
		{
			if(SSX < x)									// destination is to the right
			{
				for(int mid = 0; mid < x - SSX; ++mid)			// make a variable that moves from right start to left finish
					if(mid != 0)
						if(	gameBoard
							[SSY + mid]
							[SSX + mid]
							.getOwner() != 0)			
																		// check each movement for owned squares
								return false;							// cancel the move if current square is owned.
			}
			else													// destination is to the left
			{
				for(int mid = 0; mid < y - SSY; ++mid)			// make a variable that moves from left start to right finish
					if(mid != 0)
						if(	gameBoard
							[SSY + mid]
							[SSX - mid]
							.getOwner() != 0)			
																		// check each movement for owned squares
								return false;							// cancel the move if current square is owned.
			}
		}
		else													// destination is up
		{
			if(SSX < x)									// destination is to the right
			{
				for(int mid = 0; mid < SSY - y; ++mid)			// make a variable that moves from right start to left finish
					if(mid != 0)
						if(	gameBoard
							[SSY - mid]
							[SSX + mid]
							.getOwner() != 0)			
																		// check each movement for owned squares
								return false;							// cancel the move if current square is owned.
			}
			else													// destination is to the left
			{
				for(int mid = 0; mid < SSX - x; ++mid)			// make a variable that moves from right start to left finish
					if(mid != 0)
						if(	gameBoard
							[SSY - mid]
							[SSX - mid]
							.getOwner() != 0)			
																		// check each movement for owned squares
								return false;							// cancel the move if current square is owned.
			}
		}

		return true;												// ALL SYSTEMS GO!
	}

	bool Game::moveQueen(int x, int y)
	{
		if(!moveBishop(x,y)
		&& !moveRook(x,y))
			return false;
		else
			return true;
	}

	bool Game::moveKing(int x, int y)
	{
		if(	(selectedSquareX - 1 == x && selectedSquareY - 1 == y)
		||	(selectedSquareX + 0 == x && selectedSquareY - 1 == y)
		||	(selectedSquareX + 1 == x && selectedSquareY - 1 == y)
		||	(selectedSquareX - 1 == x && selectedSquareY - 0 == y)
		||	(selectedSquareX + 1 == x && selectedSquareY + 0 == y)
		||	(selectedSquareX - 1 == x && selectedSquareY + 1 == y)
		||	(selectedSquareX + 0 == x && selectedSquareY + 1 == y)
		||	(selectedSquareX + 1 == x && selectedSquareY + 1 == y)
		)
			return true; // ALL POSSIBLE MOVES FOR KING!
		else
			return false;
	}

	bool Game::kingHasBeenKilled(int x, int y)
	{
		if( gameBoard[y][x].getType() == 'k' )
		{
			return true;
		}
		return false;
	}

*/